feat: use n-bit mux for switching PLONK verification keys#1017
Conversation
|
@gbotrel - included you for review as I'm doing some reflect stuff to switch over all fields in verification key. |
gbotrel
left a comment
There was a problem hiding this comment.
high level tests looks decent to me, not sure about the specifics of the f.enforceWidthConditional and normalize each time I read emulated package I'm confused as to when to / when not to use them TBH.
Regarding I need normalize, as the the inputs may have different number of limbs or overflow. So the result needs to be with maximum number of limbs and overflow for further correct computations. I only need to use normalize for Select, Lookup2 and Mux. |
Description
This PR changes the mux from
Lookup2toselector.Muxwhich allows arbitrary switching. The change is backwards compatible (previously we threw an error if had more than 4 keys).Fixes #966
Type of change
How has this been tested?
How has this been benchmarked?
PLONK recursion over 10 proofs increase from 313833 to 314402.
Checklist:
golangci-lintdoes not output errors locally